import { request } from '@/utils/request.js'


export function getOrderList(data) {
	return request({
		url: '/api/order/getOrderList',
		data: JSON.stringify(data)
	});
}

export function addCart(data) {
	return request({
		url: '/api/order/addCart',
		method: 'post',
		data: data
	});
}

export function submitOrder(data) {
	return request({
		url: '/api/order/submitOrder',
		method: 'post',
		data: data
	});
}

export function goodsAmountTotal(data) {
	return request({
		url: '/api/order/goodsAmountTotal',
		method: 'post',
		data: data
	});
}

export function getCartList() {
	return request({
		url: '/api/order/getCartList',
	});
}

export function modCart(data) {
	return request({
		url: '/api/order/modCart',
		method: 'post',
		data: data
	});
}

export function removeCart(data) {
	return request({
		url: '/api/order/removeCart',
		method: 'post',
		data: data
	});
}

export function cleanCart() {
	return request({
		url: '/api/order/cleanCart',
		method: 'post',
		data: {}
	});
}

export function commitPayment(data) {
	return request({
		url: '/api/order/commitPayment',
		method: 'post',
		data: data
	});
}